<!doctype html>
<html class="no-js" lang="zxx" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>修改房屋信息</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" type="image/x-icon" href="http://localhost:8080/assets/img/favicon.ico">

    <!-- CSS here -->
    <link rel="stylesheet" href="http://localhost:8080/assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/owl.carousel.min.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/slicknav.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/animate.min.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/magnific-popup.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/themify-icons.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/slick.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/nice-select.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/style.css">
</head>
<body>
<div th:replace="template.html::header"></div>
<main>
    <!-- Hero Area Start-->
    <div class="slider-area gray-bg position-relative" th:style="'background-image: url(' + ${house.getPic()} + ')'">
        <div class="single-slider d-flex align-items-center slider-height2">
            <div class="container">
                <div class="row">
                    <div class="col-xl-12">
                        <div class="hero-caption hero-caption2">
                            <h2 style="color: whitesmoke;-webkit-text-stroke: 1px black"
                                th:text="${house.getName()}"></h2>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Hero Area End -->

    <div class="job_details_area section-bg2">
        <div class="container">
            <div class="row">
                <div class="col-lg-8">
                    <div class="apply_job_form white-bg" style="margin-top: 0; padding-top: 0">
                        <h4 th:text="${house.getName()}"></h4>
                        <form method="post" action="modify-house" enctype="multipart/form-data">
                            <input style="display: none" name="id" th:value="${house.getId()}">
                            <div class="row">
                                <div class="col-md-6">
                                    <p>名称</p>
                                    <div class="input_field">
                                        <input name="name" type="text" th:value="${house.getName()}">
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <p>价格</p>
                                    <div class="input_field">
                                        <input name="price" type="number" th:value="${house.getPrice()}" min="1">
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <p>位置</p>
                                    <div class="input_field">
                                        <input name="location" type="text" th:value="${house.getLocation()}">
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <p>房屋</p>
                                    <div class="input_field">
                                        <input name="room" type="text" th:value="${house.getRoom()}">
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <p>面积</p>
                                    <div class="input_field">
                                        <input name="area" type="number" th:value="${house.getArea()}">
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <p>房屋封面</p>
                                    <div class="input_field">
                                        <input id="image" type="file" name="pic"
                                               accept="image/gif,image/png,image/jpeg,image/bmp">
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <p>房屋描述</p>
                                    <div class="input_field">
                                        <textarea name="desc" cols="30" rows="10"
                                                  th:text="${house.getDesc()}"></textarea>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="submit_btn">
                                        <button class="boxed-btn3 w-100" type="submit">点击编辑</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>
<div th:replace="template.html::footer"></div>
<!-- Scroll Up -->
<div id="back-top">
    <a title="Go to Top" href="#"><i class="fas fa-level-up-alt"></i></a>
</div>
</body>
</html>